<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>GainerLoserActive</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<!--the following css will be used for toolbar,only for demo-->
	<link href="../../../ui/dropdownlist/dropdownlist.css" type="text/css" rel="stylesheet"/>
	<!---->
	<!--news widget-->
	<link href="../../../common/common.css" type="text/css" rel="stylesheet"/>
	<link href="../../../ui/tabmenu/tabmenu.css" type="text/css" rel="stylesheet"/>
    <link href="../../../ui/scrollpanel/scrollpanel.css" type="text/css" rel="stylesheet"/>
	<link href="../../../ui/datagrid/datagrid.css" type="text/css" rel="stylesheet"/>
	<link href="../../../widgets/gla/gla.css" type="text/css" rel="stylesheet"/>
	<link href="../../../theme/default/style.css" type="text/css" rel="stylesheet"/>
</head>
<body>	
	<!-- the container for calling functions of GainerLoserActive widget-->
	<div class="sdk-GainerLoserActive-toolbar clearfix" style="width:600px;height:30px;border:1px #ccc solid;margin-bottom:20px;">
		<label style="float:left;margin:5px;">Exchange: </label><div class="exchange-ddl-container" style="float:left"></div>
		<label style="float:left;margin:5px;">Size: </label><div class="exchange-size-container" style="float:left"></div>
	</div>
	
	<!--the container for loading the GainerLoserActive widget-->
    <div class="sdk-GainerLoserActive-container" style="width:600px;height:300px"></div>
	
	<!--jquery-->
	<script type="text/javascript" src="../../../lib/jquery.js"></script>
	
	<!--language-->
	<script type="text/javascript" src="../../../formatter/qs_formatter_en_us.js"></script>
	<script type="text/javascript" src="../../../language/en_us/qs_gla_en_us.js"></script>
	
	<!--core-->
	<script type="text/javascript" src="../../../lib/jquery.mousewheel.js"></script>
	<script type="text/javascript" src="../../../lib/jquery.json.min.js"></script>
	<script type="text/javascript" src="../../../core/common.js"></script>
	<script type="text/javascript" src="../../../core/permissionChecker.js"></script>
	<script type="text/javascript" src="../../../core/tickers.js"></script>
	<script type="text/javascript" src="../../../core/subscriber.js"></script>
	<script type="text/javascript" src="../../../core/dataHandler.js"></script>
	<script type="text/javascript" src="../../../core/pull.js"></script>
	<script type="text/javascript" src="../../../core/push.js"></script>
	<script type="text/javascript" src="../../../core/SDKDataManager.js"></script>
	<!--gla widget-->
	<script type="text/javascript" src="../../../common/common.js"></script>
	<script type="text/javascript" src="../../../ui/util/util.js"></script>
	<script type="text/javascript" src="../../../ui/tabmenu/tabmenu.js"></script>
	<script type="text/javascript" src="../../../ui/scrollpanel/scrollpanel.js"></script>
	<script type="text/javascript" src="../../../ui/datagrid/datagrid.js"></script>
	<script type="text/javascript" src="../../../widgets/gla/listView.js"></script>
	<script type="text/javascript" src="../../../widgets/gla/gla.js"></script>
	<script type="text/javascript" src="../../../theme/default/style.js"></script>
	<!--the following js will be used for toolbar,only for demo-->
	<script type="text/javascript" src="../../../ui/dropdownlist/dropdownlist.js"></script>
	<!---->

	<script type="text/javascript">
		QSAPI.init("DISN");
		var gla=null;
		QSAPI.Authentication.login("3385076F54485060427403D4CB3EDBF4B51A60E75510834F099A0A9AB1DE930BBFEFB3E1FB0737DD7F2D0D340124D21449EDCE45B1AD19162FB476BE0EAF47CB","62AE252A46399A992E5E581ACE458353C76F388C0B72B2A22E6A4D5077204D8E732AD3693025559AFA9FED3A3EF09354EA0DAA3F6EEE6158D98820232F345C1C",{
			onFailure:function(result){
			},
			onSuccess:function(result){
				QSAPI.DataManager.connectToPull("http://qsstage.morningstar.com/pullservice/pull/getPullQuote.jsp",5000,{
					onSuccess:function(gKeyList,failResult){
						gla=new QSAPI.Widget.GainerLoserActive($('.sdk-GainerLoserActive-container'),{exchange:'TSX'});
					},
					onFailure:function(result){
						
					}
				});
				
			}
		});
		
		//init toolbar and call functions of GainerLoserActive
		var exchangeDDL=new Util.DropDownList($('.exchange-ddl-container'),function(t, v){
			if(gla){
				gla.changeExchange(v);
			}
        },[{
			val:'TSX',
			txt:'TSX'
		},{
			val:'TSXV',
			txt:'TSX Venture'
		},{
			val:'NYSE',
			txt:'NYSE'
		},{
			val:'AMEX',
			txt:'AMEX'
		},{
			val:'NASDAQ',
			txt:'NASDAQ'
		}],{
            actionAtInit:false,
			width:100
        });
		
		var sizeDDL=new Util.DropDownList($('.exchange-size-container'),function(t, v){
			if(gla){
				var size=v.split(',');
				gla.changeOutSize(size[0],size[1]);
			}
        },[{
			val:'600,300',
			txt:'600*300'
		},{
			val:'1000,300',
			txt:'1000*300'
		},{
			val:'600,200',
			txt:'600*200'
		}],{
            actionAtInit:false,
			width:100
        });
    </script>
</body>
</html>



